Loading
Scriptbox
 VBScript Links 
 About VBscript 
 JavaScript Links 
 About JavaScript 
 Powershell Links 
 PSCRIPT the Script Launcher 
 PowerShell Shortcut Keys 
 About Powershell 
     VBScript
    JavaScript
    Powershell
Disclaimer
Contact
Latest 10 Scripts
Script search
  :: { Category } :: 0-9ABCDEFGHIJKLMNOPQRSTUVWXYZ
         

Search Options:  Get  a  List  of  the  Unique  Words  Used  in  a  Microsoft  Word  Document  

 Content of Get a List of the Unique Words Used in a Microsoft Word Document.vbs
MD5 Hash: 4B26FB116356904DF172DF20B80DAF14
Set objDictionary = CreateObject("Scripting.Dictionary")

Set objWord = CreateObject("Word.Application")
objWord.Visible = True

Set objDoc = objWord.Documents.Open("C:\Scripts\Sample.doc")

Set colWords = objDoc.Words

For Each strWord in colWords
strWord = LCase(strWord)
If objDictionary.Exists(strWord) Then
Else
objDictionary.Add strWord, strWord
End If
Next

Set objDoc2 = objWord.Documents.Add()
Set objSelection = objWord.Selection

For Each strItem in objDictionary.Items
objSelection.TypeText strItem & vbCrLf
Next

Set objRange = objDoc2.Range
objRange.Sort



   © 2008 - 2013 Boris Toll      :: Scripts available: 6.481 ::      :: scriptbox.toll.at ::      :: powered by www.toll.at ::
  Google Entries:n/a
  Yahoo Backlinks:n/a
  Live Backlinks:n/a
  del.icio.us Bookmarks:n/a
  Technorati Links:n/a